@anythingai/cli 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # @anythingai/cli
2
+
3
+ CLI client for the Anything API.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @anythingai/cli
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ Authenticate in either of these ways:
14
+
15
+ ```bash
16
+ anything auth login
17
+ ```
18
+
19
+ or:
20
+
21
+ ```bash
22
+ export ANYTHING_API_KEY=anything_xxx
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ### Create an app, iterate on it, and publish
28
+
29
+ ```bash
30
+ # Find your organization ID
31
+ anything user
32
+ anything orgs
33
+
34
+ # Create a new app
35
+ anything projects create --prompt "Build a todo app with dark mode" --org <org-id> --name "My Todo App"
36
+ # Returns: projectId, revisionId
37
+
38
+ # List existing apps
39
+ anything projects list --org <org-id>
40
+
41
+ # Or pipe the prompt on stdin
42
+ cat prompt.txt | anything projects create --org <org-id>
43
+
44
+ # Send follow-up prompts
45
+ anything projects generate <project-id> --prompt "Add a filter for completed tasks"
46
+ cat changes.txt | anything projects generate <project-id>
47
+
48
+ # Check generation status and read messages
49
+ anything projects messages <project-id>
50
+
51
+ # Inspect generated code
52
+ anything projects files list <project-id>
53
+ anything projects files get <project-id> app/page.tsx
54
+
55
+ # Read recent development logs
56
+ anything projects logs <project-id> --limit 50
57
+
58
+ # View project info, dev server URL, and published URLs
59
+ anything projects get <project-id>
60
+
61
+ # Publish when ready
62
+ anything projects publish <project-id>
63
+ ```
64
+
65
+ ### Manage secrets
66
+
67
+ ```bash
68
+ # Add an environment variable
69
+ anything projects secrets add <project-id> --name "OPENAI_API_KEY" --value "sk-..."
70
+ cat secret.txt | anything projects secrets add <project-id> --name "OPENAI_API_KEY"
71
+
72
+ # Remove a secret
73
+ anything projects secrets remove <project-id> <secret-id>
74
+ ```
75
+
76
+ ### JSON output
77
+
78
+ All commands support `--json` for scripting:
79
+
80
+ ```bash
81
+ anything orgs --json
82
+ anything user --json
83
+ anything projects messages <project-id> --json
84
+ ```
85
+
86
+ ### Pointing at a different server
87
+
88
+ ```bash
89
+ anything --api-url http://localhost:8702 orgs
90
+ ```
91
+
92
+ ## Auth
93
+
94
+ The CLI uses API keys. It reads credentials from `ANYTHING_API_KEY` first, then
95
+ falls back to the local config created by `anything auth login`.
96
+
97
+ ```bash
98
+ anything auth status # check if logged in
99
+ anything auth logout # clear tokens
100
+ ```