tripwire-cli 0.2.0__tar.gz

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.
@@ -0,0 +1,48 @@
1
+ # Per-run logs and analysis — never commit.
2
+ runs/
3
+ *.log
4
+
5
+ # Local secrets.
6
+ .run_tag
7
+ .canaries.env
8
+ .env
9
+ tests/config/local.env
10
+ tests/config/production.env
11
+
12
+ # Python.
13
+ __pycache__/
14
+ *.pyc
15
+ *.egg-info/
16
+ .venv/
17
+ .pytest_cache/
18
+
19
+ # Fly.
20
+ .fly/
21
+
22
+ # Editor.
23
+ .vscode/
24
+ .idea/
25
+ *.swp
26
+ .DS_Store
27
+
28
+ # Local Claude Code state.
29
+ .claude/
30
+
31
+ # Generated assistant rule outputs. Source rules live in committed `.rules/`
32
+ # directories; regenerate these with `uv run --project scripts python -m
33
+ # scripts.generate_rules`.
34
+ .cursor/
35
+ .kilocode/
36
+ .agents/
37
+ website/AGENTS.md
38
+ website/CLAUDE.md
39
+
40
+ # Cortex caches (committed docs live alongside, but caches are regenerable).
41
+ .cortex/.cache/
42
+
43
+ # Roam / cortex semantic-check local cache.
44
+ .roam/
45
+
46
+ # Local/generated research exports.
47
+ *_anchor*_cioh_h*.csv
48
+ /research
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: tripwire-cli
3
+ Version: 0.2.0
4
+ Summary: Command-line client for Tripwire canaries
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: click>=8.1
7
+ Requires-Dist: httpx>=0.27
8
+ Description-Content-Type: text/markdown
9
+
10
+ # tripwire-cli
11
+
12
+ Command-line client for [Tripwire](https://tripwire.so) canaries. Installs a
13
+ single `tripwire` command.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ uv tool install --from . tripwire-cli
19
+ ```
20
+
21
+ Or run without installing:
22
+
23
+ ```bash
24
+ uvx --from . tripwire --help
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ # Log in and cache a token. Defaults to passwordless email-code login: it
31
+ # prompts for your email (defaulting to `git config user.email`) and the
32
+ # 6-digit code emailed to you. Operators can pass --user-id / --password to use
33
+ # the user-id + password login instead.
34
+ tripwire login
35
+
36
+ # Create a canary. The credential is returned once, in this response, so
37
+ # capture it now. Provider-minted types (aws/anthropic/github) can take ~2 min;
38
+ # the CLI waits and prints a progress note while it provisions.
39
+ tripwire canaries create --type dns_label --memo "env metrics host"
40
+ tripwire canaries create --type aws_access_key --memo "warehouse reporting key"
41
+
42
+ # Inspect what you own (summaries only; the credential is never shown again).
43
+ tripwire canaries list
44
+ tripwire canaries get can_1234abcd
45
+
46
+ # Wind one down.
47
+ tripwire canaries deactivate can_1234abcd
48
+ tripwire canaries delete can_1234abcd
49
+ ```
50
+
51
+ `canaries` subcommands print JSON to stdout (pipe to `jq`); progress and other
52
+ plain-text messages go to stderr, so stdout stays clean JSON. Run
53
+ `tripwire --help` for the full reference.
54
+
55
+ Supported create types are `dns_label`, `aws_access_key`, `anthropic_api_key`,
56
+ and `github_pat`.
57
+
58
+ `canaries create` accepts `--timeout <seconds>` (env `TRIPWIRE_CREATE_TIMEOUT`,
59
+ default 240) for the per-request read timeout; it must stay above the server's
60
+ ~180s provisioning wait so the one-time credential reveal is never lost to a
61
+ premature client timeout.
62
+
63
+ ## Server
64
+
65
+ `login` talks to `https://tripwire.so/api/v1` by default. Set `TRIPWIRE_SERVER`
66
+ to point at a self-hosted or test server before logging in; the server is bound
67
+ to your token at login time. The token is cached at
68
+ `~/.config/tripwire/credentials.json` (honoring `XDG_CONFIG_HOME`).
@@ -0,0 +1,59 @@
1
+ # tripwire-cli
2
+
3
+ Command-line client for [Tripwire](https://tripwire.so) canaries. Installs a
4
+ single `tripwire` command.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ uv tool install --from . tripwire-cli
10
+ ```
11
+
12
+ Or run without installing:
13
+
14
+ ```bash
15
+ uvx --from . tripwire --help
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ # Log in and cache a token. Defaults to passwordless email-code login: it
22
+ # prompts for your email (defaulting to `git config user.email`) and the
23
+ # 6-digit code emailed to you. Operators can pass --user-id / --password to use
24
+ # the user-id + password login instead.
25
+ tripwire login
26
+
27
+ # Create a canary. The credential is returned once, in this response, so
28
+ # capture it now. Provider-minted types (aws/anthropic/github) can take ~2 min;
29
+ # the CLI waits and prints a progress note while it provisions.
30
+ tripwire canaries create --type dns_label --memo "env metrics host"
31
+ tripwire canaries create --type aws_access_key --memo "warehouse reporting key"
32
+
33
+ # Inspect what you own (summaries only; the credential is never shown again).
34
+ tripwire canaries list
35
+ tripwire canaries get can_1234abcd
36
+
37
+ # Wind one down.
38
+ tripwire canaries deactivate can_1234abcd
39
+ tripwire canaries delete can_1234abcd
40
+ ```
41
+
42
+ `canaries` subcommands print JSON to stdout (pipe to `jq`); progress and other
43
+ plain-text messages go to stderr, so stdout stays clean JSON. Run
44
+ `tripwire --help` for the full reference.
45
+
46
+ Supported create types are `dns_label`, `aws_access_key`, `anthropic_api_key`,
47
+ and `github_pat`.
48
+
49
+ `canaries create` accepts `--timeout <seconds>` (env `TRIPWIRE_CREATE_TIMEOUT`,
50
+ default 240) for the per-request read timeout; it must stay above the server's
51
+ ~180s provisioning wait so the one-time credential reveal is never lost to a
52
+ premature client timeout.
53
+
54
+ ## Server
55
+
56
+ `login` talks to `https://tripwire.so/api/v1` by default. Set `TRIPWIRE_SERVER`
57
+ to point at a self-hosted or test server before logging in; the server is bound
58
+ to your token at login time. The token is cached at
59
+ `~/.config/tripwire/credentials.json` (honoring `XDG_CONFIG_HOME`).
@@ -0,0 +1,29 @@
1
+ [project]
2
+ name = "tripwire-cli"
3
+ version = "0.2.0"
4
+ description = "Command-line client for Tripwire canaries"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "click>=8.1",
9
+ "httpx>=0.27",
10
+ ]
11
+
12
+ [project.scripts]
13
+ tripwire = "tripwire_cli.cli:main"
14
+ tripwire-cli = "tripwire_cli.cli:main"
15
+
16
+ [build-system]
17
+ requires = ["hatchling"]
18
+ build-backend = "hatchling.build"
19
+
20
+ [tool.hatch.build.targets.wheel]
21
+ packages = ["tripwire_cli"]
22
+
23
+ [dependency-groups]
24
+ dev = [
25
+ "pytest>=8.3",
26
+ ]
27
+
28
+ [tool.pytest.ini_options]
29
+ testpaths = ["tests"]