Menu
Introduction
Install
To install Tangram, run the install script below, or download the latest release and add it to $PATH.
curl -fsSL https://tangram.dev/install.sh | shHello, World!
Create a file named tangram.ts at the root of your project with the following content.
export default () => tg.file("Hello, World!");This creates a command which outputs a file with the contents Hello, World!. Run tg build to build the command.
$ tg buildfil_01tvcqmbbf8dkkejz6y69ywvgfsh9gyn1xjweyb9zgv0sf4752446gRun tg checkout to check out the output.
# Check out the file to `hello.txt`.$ tg checkout fil_01tvcqmbbf8dkkejz6y69ywvgfsh9gyn1xjweyb9zgv0sf4752446g hello.txt# Print the file's contents.$ cat hello.txtHello, World!Run v. Build
export default () => tg.log("Hello, World!");Run tg run.
$ tg runinfo process pcs_deadbeefHello, World!Run tg run again.
$ tg runinfo process pcs_cafebabeHello, World!Each time you invoke tg run, a new process is run and you will see Hello, World! printed to the console.
Now invoke tg build.
$ tg buildinfo process pcs_feedfaceAnd invoke tg build again.
$ tg buildinfo process pcs_feedfaceYou will see the same process id. When you invoke build, you are running a process in a sandbox. The process is cached and each re-invocation will fetch the cached process.