Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

kwnt token: add --raw to the Docker hint

Lin (kwant bot)bfd850f6ff5e
diff --git a/src/main.rs b/src/main.rs
index 09bd2135..3b231223 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -137,7 +137,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
eprintln!("kwnt token only reads the token of a kwant install; it never makes one.");
eprintln!(" - Run it as the user that runs `kwnt serve`, with the same KWNT_DATA_DIR");
eprintln!(" (systemd setup from the README: sudo cat /var/lib/kwnt/api-token).");
- eprintln!(" - Docker: docker compose exec kwnt kwnt token");
+ eprintln!(" - Docker: docker compose exec kwnt kwnt token --raw");
eprintln!(" - If KWNT_API_TOKEN is set for the server, that value is the token.");
eprintln!(" - Never started yet? `kwnt serve` creates the token on first run.");
std::process::exit(1);
diff --git a/tests/token_cli_test.rs b/tests/token_cli_test.rs
index c1ea7344..27140b08 100644
--- a/tests/token_cli_test.rs
+++ b/tests/token_cli_test.rs
@@ -21,6 +21,7 @@ fn token_fails_without_a_token_file_and_creates_nothing() {
let err = String::from_utf8_lossy(&out.stderr);
assert!(err.contains("no token file at"), "{err}");
assert!(err.contains("as the user that runs `kwnt serve`"), "{err}");
+ assert!(err.contains("docker compose exec kwnt kwnt token --raw"), "{err}");
assert!(!dir.path().join("api-token").exists());
}