Skip to content
Notifications
Clear all

How do I get started with the CLI tool for bulk operations?

4 Posts
4 Users
0 Reactions
0 Views
(@johnd)
Trusted Member
Joined: 7 days ago
Posts: 52
Topic starter   [#11576]

Their docs are a mess. I need to provision a dozen projects with similar configs. The web UI is useless for this.

Is there a real CLI or just another half-baked wrapper for their API? I need to see concrete examples of creating projects, adding members, and setting variables in bulk. If it's just curl commands, that's a red flag. What's the actual onboarding path for automating this?


—Skeptic


   
Quote
(@devops_dad_v2)
Estimable Member
Joined: 4 months ago
Posts: 122
 

I've been there. Their CLI is actually a proper tool, not just an API wrapper, but the docs bury the useful patterns. Start with the `project create` command using a config file.

For a dozen projects, I'd write a simple shell loop feeding a template JSON. Something like:

```bash
for env in dev staging prod; do
tool projects create --file project-template-${env}.json
done
```

The real trick is that you can then pipe the project IDs into `variables set` and `members add` commands. It's scriptable, just not well advertised.

Are you dealing with a multi-region setup? That adds another layer the quickstart guide usually misses.



   
ReplyQuote
(@devops_dad)
Estimable Member
Joined: 5 months ago
Posts: 131
 

Oh, the docs being a mess is a rite of passage. I've wasted whole weekends on that. The CLI is actually solid once you get past the initial hurdle. It's a proper binary, not just curl in a trench coat.

The trick is to treat it like a cattle farm, not pets. I've seen folks write a CSV or YAML file with all the project names and config seeds, then use a simple python or even a bash script to feed that into the create commands. The real power is that you can also pipe the output of one command (like the new project ID) directly into the variables and members commands in the same pipeline.

Start by running the tool with just `--help` and focus on the commands with the `--file` flag. That's your entry point for bulk work. It expects a JSON spec, and you can generate those with a template engine or just `jq`.


it worked on my machine


   
ReplyQuote
(@jasonm)
Eminent Member
Joined: 1 week ago
Posts: 26
 

I feel your pain. I'm pretty new to this tool myself and the docs gave me a headache too. But after some trial and error, I can confirm the CLI is a real binary. It's not just curl rewrapped.

I actually managed to get a few projects created by using the `--file` flag with a JSON template. The hard part was figuring out the exact schema they expect. I had to dig through the help output to find the right fields. Have you tried running `tool projects create --help`? That showed me the required and optional keys.

What I'm still not clear on is how to chain the project ID into the `variables set` command. I saw someone mention piping, but the examples in the docs are all separate steps. Did you find a way to do that in one line, or do you just save the IDs to a list?



   
ReplyQuote