@ait-co/console-cli 0.1.3 โ†’ 0.1.5

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  > ๐Ÿšง **Pre-1.0 (`0.1.x`)** โ€” published to npm but the surface is still small. `whoami` / `login` / `logout` / `upgrade` are usable today; `deploy` / `logs` / `status` are next on [TODO.md](./TODO.md).
4
4
  > 1.0 ์ด์ „ ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค. ์ผ๋ถ€ ๋ช…๋ น(`whoami`/`login`/`logout`/`upgrade`)๋งŒ ๋™์ž‘ํ•˜๊ณ , `deploy`/`logs`/`status`๋Š” ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค.
5
5
 
6
- `ait-console` is a community-maintained CLI for automating Apps in Toss developer console operations โ€” log in once in a browser, then drive subsequent operations from your shell or from an AI coding agent via headless browser automation.
6
+ `aitcc` is a community-maintained CLI for automating Apps in Toss developer console operations โ€” log in once in a browser, then drive subsequent operations from your shell or from an AI coding agent via headless browser automation.
7
7
 
8
8
  ์•ฑ์ธํ† ์Šค ์ฝ˜์†”์„ CLI๋กœ ์ž๋™ํ™”ํ•˜๋Š” ์ปค๋ฎค๋‹ˆํ‹ฐ ๋„๊ตฌ. ์ตœ์ดˆ ๋กœ๊ทธ์ธ๋งŒ ๋ธŒ๋ผ์šฐ์ €๋กœ ํ•˜๊ณ , ์ดํ›„ ์ž‘์—…์€ headless ๋ธŒ๋ผ์šฐ์ €๋กœ ์ฒ˜๋ฆฌํ•œ๋‹ค. (MCP ๋ชจ๋“œ๋Š” ํ›„์ˆœ์œ„ โ€” [TODO.md](./TODO.md) ์ฐธ๊ณ .)
9
9
 
@@ -19,15 +19,15 @@
19
19
  curl -fsSL https://raw.githubusercontent.com/apps-in-toss-community/console-cli/main/install.sh | sh
20
20
  ```
21
21
 
22
- The installer detects OS (`uname -s`) and arch (`uname -m`), downloads the matching binary from the latest GitHub Release, verifies it against `SHA256SUMS`, and installs it to `$HOME/.local/bin/ait-console`. Node is **not** required.
22
+ The installer detects OS (`uname -s`) and arch (`uname -m`), downloads the matching binary from the latest GitHub Release, verifies it against `SHA256SUMS`, and installs it to `$HOME/.local/bin/aitcc`. Node is **not** required.
23
23
 
24
24
  Pin a specific version:
25
25
 
26
26
  ```sh
27
- curl -fsSL https://raw.githubusercontent.com/apps-in-toss-community/console-cli/main/install.sh | AIT_CONSOLE_VERSION=v0.1.1 sh
27
+ curl -fsSL https://raw.githubusercontent.com/apps-in-toss-community/console-cli/main/install.sh | AITCC_VERSION=v0.1.1 sh
28
28
  ```
29
29
 
30
- Override the install directory with `AIT_CONSOLE_INSTALL_DIR=/custom/path` (default `$HOME/.local/bin`).
30
+ Override the install directory with `AITCC_INSTALL_DIR=/custom/path` (default `$HOME/.local/bin`).
31
31
 
32
32
  ### npm (fallback)
33
33
 
@@ -43,38 +43,49 @@ This is the path that `agent-plugin` uses when a project already has Node instal
43
43
  ## Quick usage
44
44
 
45
45
  ```sh
46
- ait-console --version # print the embedded version
47
- ait-console login # open the browser, capture the OAuth callback on localhost, save the session
48
- ait-console login --no-browser # print the authorize URL instead of auto-opening a browser
49
- ait-console logout # delete the local session file
50
- ait-console whoami # show the currently logged-in user (exits non-zero if no session)
51
- ait-console whoami --json # machine-readable output for scripts and agents
52
- ait-console upgrade # self-update to the latest GitHub Release (binary installs only)
53
- ait-console upgrade --dry-run # check for an update without downloading or replacing
54
- ait-console upgrade --force # reinstall the latest release even if versions match
46
+ aitcc --version # print the embedded version
47
+ aitcc login # launch a browser window, sign in there, and capture the session cookies
48
+ aitcc logout # delete the local session file
49
+ aitcc whoami # show the currently logged-in user live from the console API
50
+ aitcc whoami --offline # use the cached identity without hitting the API
51
+ aitcc whoami --json # machine-readable output for scripts and agents
52
+ aitcc upgrade # self-update to the latest GitHub Release (binary installs only)
53
+ aitcc upgrade --dry-run # check for an update without downloading or replacing
54
+ aitcc upgrade --force # reinstall the latest release even if versions match
55
55
  ```
56
56
 
57
- `ait-console upgrade` respects `GITHUB_TOKEN` to avoid anonymous GitHub API rate limits.
57
+ `aitcc upgrade` respects `GITHUB_TOKEN` to avoid anonymous GitHub API rate limits.
58
58
 
59
59
  Planned commands โ€” `deploy`, `logs`, `status` โ€” are tracked in [TODO.md](./TODO.md).
60
60
 
61
61
  ### Login details
62
62
 
63
- `ait-console login` spawns a short-lived HTTP server on `127.0.0.1:<random-port>` and waits for the OAuth provider to redirect back to `/callback` with a `code` and a `state` parameter. The `state` is a 32-byte crypto-random value generated per attempt and rechecked on arrival โ€” any mismatch is rejected with a 400 and the login aborts. The server binds to the loopback interface only, listens for exactly one successful callback, and shuts down after either success or a 5-minute timeout (override with `--timeout <seconds>`).
63
+ `aitcc login` launches a Chrome-family browser via the Chrome DevTools Protocol, navigates it to the Apps in Toss developer console sign-in URL, and waits for the main frame to reach the post-login workspace page. Once it does, the CLI dumps all cookies over CDP (including `HttpOnly` auth cookies that JavaScript can't see) and persists them to the local session file. The browser runs against a temporary, isolated `--user-data-dir` that is wiped on exit, so your everyday browser profile is never touched.
64
64
 
65
- The Apps in Toss developer console OAuth authorize URL is not publicly documented yet (see [CLAUDE.md](./CLAUDE.md) ยง "Open questions"). Until it is, set `AIT_CONSOLE_OAUTH_URL` (and optionally `AIT_CONSOLE_OAUTH_CLIENT_ID` / `AIT_CONSOLE_OAUTH_SCOPE`) to point at the real endpoint; without it, `login` exits with a usage error rather than calling a placeholder.
65
+ The CLI looks for Chrome in the standard OS install locations (Google Chrome, Chromium, Microsoft Edge). Override the executable with `AITCC_BROWSER=/path/to/chrome` if your install is elsewhere; override the sign-in URL with `AITCC_OAUTH_URL` if you need to point at a staging environment. `--timeout <seconds>` controls how long the CLI will wait for sign-in to finish (default 300s).
66
66
 
67
67
  ## Session storage
68
68
 
69
69
  The local session lives at an XDG-compliant path with file mode `0600`:
70
70
 
71
- - Linux/macOS: `$XDG_CONFIG_HOME/ait-console/session.json` (fallback `~/.config/ait-console/session.json`)
72
- - Windows: `%APPDATA%\ait-console\session.json`
71
+ - Linux/macOS: `$XDG_CONFIG_HOME/aitcc/session.json` (fallback `~/.config/aitcc/session.json`)
72
+ - Windows: `%APPDATA%\aitcc\session.json`
73
73
 
74
- The containing directory is created with mode `0700`. Cookies and storage-state origins captured during login are **never** printed, logged, or attached to `--verbose` output โ€” only `user.email` and `displayName` surface through `whoami`. Playwright screenshots are off by default.
74
+ The containing directory is created with mode `0700`. Cookies captured during login are **never** printed, logged, or attached to `--verbose` output โ€” only `user.email`, `name`, and workspace summary surface through `whoami`.
75
75
 
76
76
  See [CLAUDE.md](./CLAUDE.md) for the rationale behind using a plain `0600` file instead of an OS keychain.
77
77
 
78
+ ## Update notifications
79
+
80
+ When running interactively, `aitcc` occasionally checks for a newer release and prints a one-line notice on stderr if one exists. The check is rate-limit friendly:
81
+
82
+ - At most one network call every 24 hours, no matter how often you run commands.
83
+ - Even a failed check updates the throttle window, so a broken network or a 403 from GitHub does not loop back within minutes.
84
+ - Conditional GET (`If-None-Match`) โ€” a 304 response does not consume the anonymous GitHub rate-limit bucket.
85
+ - The check is skipped entirely when stdout is not a TTY, when `--json` is passed, or when `AITCC_NO_UPDATE_CHECK=1` is set.
86
+
87
+ Cached state lives at `$XDG_CACHE_HOME/aitcc/upgrade-check.json` (fallback `~/.cache/aitcc/upgrade-check.json`).
88
+
78
89
  ## Machine-readable output (`--json`)
79
90
 
80
91
  Every command accepts `--json`. When set:
@@ -87,4 +98,4 @@ Every command accepts `--json`. When set:
87
98
 
88
99
  ## Status
89
100
 
90
- Scaffold complete. `whoami`, `login`, `logout`, and `upgrade` are implemented (`login` still needs the real Toss OAuth endpoint โ€” override via `AIT_CONSOLE_OAUTH_URL`); `deploy`, `logs`, `status` are not yet โ€” see [TODO.md](./TODO.md). See the [organization landing page](https://apps-in-toss-community.github.io/) for the full roadmap.
101
+ `login`, `logout`, `whoami`, and `upgrade` are implemented end-to-end โ€” `login` drives a real browser over CDP and `whoami` reads the live console member API. `deploy`, `logs`, `status` are next โ€” see [TODO.md](./TODO.md). See the [organization landing page](https://apps-in-toss-community.github.io/) for the full roadmap.