Skip to main content

Generate project tech documentation and push to Confluence using GitHub Copilot SDK

Project description

tsu-cli

Generate project tech documentation using GitHub Copilot SDK and push to Confluence.

Prerequisites

Installation

pip install tsu-cli

Development install

git clone https://github.com/vivekrana2012/tsu-cli.git
cd tsu-cli
pip install -e ".[dev]"

Quick Start

# 1. Initialize in your project directory
cd /path/to/your/project
tsu init

# 2. Generate tech documentation
tsu generate

# 3. Push to Confluence
tsu push

Commands

tsu init

Interactive setup — creates .tsu/ directory with configuration files.

If you provide a parent page URL and credentials, a blank placeholder page is created on Confluence during init. The page_id is saved in .tsu/confluence.json so that all future tsu push runs (including from CI/CD pipelines like Jenkins) update the same page instead of creating duplicates. Re-running tsu init preserves the existing page_id.

tsu init
tsu init --dir /path/to/project

tsu generate

Analyze the project using GitHub Copilot and generate .tsu/document.md.

If a Confluence page already exists, the current page content is pulled and sent to the LLM as reference — preserving any manually added content while updating sections based on the latest codebase.

tsu generate
tsu generate --model claude-sonnet-4.5
tsu generate --output custom-doc.md
tsu generate --extra "Focus on the authentication flow"
tsu generate --offline    # skip Confluence sync, generate fresh

tsu models

List available LLM models from the Copilot SDK.

tsu models

tsu push

Upload .tsu/document.md to Confluence. Creates a new page on first push, updates the existing page on subsequent pushes.

tsu push

tsu help

Show a detailed guide covering the full workflow, all commands, flags, authentication, prompt customization, and examples.

tsu help

tsu auth

Manage Confluence credentials (stored in system keychain, never on disk).

tsu auth set      # Store email + token in keychain
tsu auth status   # Check credential configuration
tsu auth clear    # Remove stored credentials

Configuration

All config lives in .tsu/ (safe to commit — no secrets):

File Purpose
config.json Tool settings (model, output file)
confluence.json Confluence page target
generate.md Prompt template (editable)
document.md Generated documentation

Confluence Credentials

Credentials are resolved in this order (never stored in config files):

  1. Environment variables: CONFLUENCE_USER, CONFLUENCE_TOKEN
  2. System keychain (via tsu auth set)
  3. Interactive prompt

Use environment variables for CI/CD pipelines.

Customizing the Prompt

tsu init copies the default prompt template to .tsu/generate.md. Edit it freely to change the document structure, sections, or instructions — your changes are used on every subsequent tsu generate run.

The template uses Jinja2 syntax. The variable {{ additional_instructions }} is populated by the --extra flag.

Re-running tsu init will not overwrite an existing .tsu/generate.md, so your edits are safe.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsu_cli-0.1.7.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsu_cli-0.1.7-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file tsu_cli-0.1.7.tar.gz.

File metadata

  • Download URL: tsu_cli-0.1.7.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tsu_cli-0.1.7.tar.gz
Algorithm Hash digest
SHA256 00b22ba44ec6b8a2972447c3dee8e4750d6fdc522c81766688dce35d16d4a7d7
MD5 d1882fefe4d9e978dc68d1cf43f3ac3a
BLAKE2b-256 3b5678f92f6ec31407e6a264d7cf10ea75fc8541f6bfc6b6d279fbb2e6869db5

See more details on using hashes here.

File details

Details for the file tsu_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: tsu_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tsu_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c6513e7a5bcd737e4c77c9c2161a78bdbfe6cd85b88e22d23839a848a908f3d5
MD5 88f59df04702d03906ba30355a7df979
BLAKE2b-256 684b9d58f5baec8a9606ff15e1597a14e26c956f211fdca5035e9b8c68848d38

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page