@transposit/cli
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Transposit CLI

CLI for interacting with Transposit Hosted Applications.

Requirements

NodeJS >= 14.x

Installation / Upgrading

$ npm i -g @transposit/cli

Setup

  1. Go to https://console.transposit.com/dev/settings and login
  2. Note your "Username" at the top of the page
  3. Copy (Generating a new one if needed) your "User Api Key" at the bottom of the page
  4. Run transposit login $username $token using the values from steps 2 & 3
  5. The first time you clone a repo, you will need to login separately to git, using the same username, and the "Git access token" near the top of the page

Usage

$ transposit help
...
$ transposit clone myteam hello_world
🐙 $ git clone https://console.transposit.com/git/myteam/hello_world
Cloning into 'hello_world'...
remote: Counting objects: 231, done
remote: Finding sources: 100% (231/231)
remote: Getting sizes: 100% (54/54)
remote: Total 231 (delta 116), reused 231 (delta 116)
Receiving objects: 100% (231/231), 27.34 KiB | 756.00 KiB/s, done.
Resolving deltas: 100% (116/116), done.
$ cd hello_world
$ transposit login myuser *****
$ transposit run src/input_prompt.py
{
  "type": "section",
  "text": {
    "type": "plain_text",
    "text": "This action is going to output 'Hello world'"
  }
}

Important Notes

  • If you edit multiple operation files at the same time, only the one passed as an argument to transposit run (the "entry point") will run the code from your local directory. All other operations which that script invokes will be run from the master branch currently pushed to your repository.

    For example, if you have a script execute.py, which calls api.run("this.another_op"), and you edit execute.py and another_op.py, and then do transposit run execute.py, only the edits to execute.py will be picked up. To test both together, you'll need to push your changes by committing & pushing them to master using git before doing the transposit run.

  • If you edit the manifest.json, e.g. to change the parameters that an operation takes, you likewise will need to commit and push before running.

Dependencies (7)

Dev Dependencies (20)

Package Sidebar

Install

npm i @transposit/cli

Weekly Downloads

0

Version

2.1.1

License

Apache-2.0

Unpacked Size

69.3 kB

Total Files

36

Last publish

Collaborators

  • tuan.nguyen.tps
  • blazarus
  • nina.yang
  • transpositnpm