Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tsukuyo

A CLI tool to streamline SSH connections, inventory management, and PostgreSQL administration

License Version Go Version

📖 About

Tsukuyo is a command-line tool designed to automate and streamline various operational tasks. It provides a unified interface for managing SSH connections (both standard SSH and Teleport SSH), maintaining inventories of connection details, executing predefined scripts, and administering PostgreSQL databases. The goal is to reduce manual steps in common workflows and improve productivity.

✨ Features

🚀 Installation

Prerequisites

  • Go 1.22 or higher
  • For TSH functionality: Teleport client installed and configured

Build from Source

git clone https://github.com/arung-agamani/tsukuyo.git
cd tsukuyo
go build -o tsukuyo
cp tsukuyo /usr/local/bin/   # or ~/bin/ if in your PATH

📋 Quick Start

SSH

tsukuyo ssh <node-name>                                              # connect
tsukuyo ssh <node-name> --tunnel 8080:localhost:80                   # tunnel
tsukuyo ssh <node-name> --with-db                                    # tunnel with DB
tsukuyo ssh list                                                     # list nodes

See full docs: SSH Connection Management

Teleport SSH

tsukuyo tsh                    # interactive connect
tsukuyo tsh --with-db          # connect with DB tunnel

See full docs: SSH Connection Management

Script Management

tsukuyo script add                                        # add script (interactive)
tsukuyo script list                                       # list all scripts
tsukuyo script search <query>                             # search scripts
tsukuyo script run <name>                                 # run a script
tsukuyo script run <name> --with-env-file .env            # run with env vars

See full docs: Script Management

Inventory

tsukuyo inventory query db.my-db.host                    # query value
tsukuyo inventory set app.debug true                     # set value
tsukuyo inventory delete db.test-db                      # delete value
tsukuyo inventory db set prod-pg pg.example.com          # add DB entry
tsukuyo inventory db list                                # list DB entries

See full docs: Inventory Management

PostgreSQL Administration

# Target management (kubectx-style switching)
tsukuyo postgres target add                              # add target (interactive)
tsukuyo postgres target list                             # list targets
tsukuyo postgres target use                              # switch active target

# Role management
tsukuyo pq role list                                     # list roles
tsukuyo pq role create <name> --login --password <pw>    # create role
tsukuyo pq role delete <name>                            # delete role

# Database management
tsukuyo pq db list                                       # list databases
tsukuyo pq db create <name> --owner <role>               # create database
tsukuyo pq db delete <name>                              # delete database

# Permission management
tsukuyo pq perm grant --role app --on-table users --privs SELECT,INSERT
tsukuyo pq perm show app_user                            # show role permissions
tsukuyo pq perm audit                                    # security audit
tsukuyo pq perm template apply readonly --role reader --db myapp

See full docs: PostgreSQL Administration

📝 Roadmap

  • ✅ Hierarchical inventory with JSONPath queries
  • ✅ Enhanced DB inventory with recovery & CLI flags
  • ✅ Tag-based filtering for DB tunnels
  • ✅ PostgreSQL role & database CRUD
  • ✅ PostgreSQL permission management & audit
  • Add support for multiple SSH keys
  • Add configuration options
  • Expand TSH integration capabilities
  • Add support for other script languages (Node.js, Python)
  • Add import/export functionality for inventory data

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Tsukuyo?

Tsukuyo

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Not so Important Notes

Almost the whole entirity of this project is done through vibe coding, though I know what I'm doing, because in some moments, the LLM models are just plain dumb.

✏️ Author

Arung Agamani

About

A Pocket-sized CLI tool for easier inventory management, SSH and Teleport connections, and other DevOps-centric automations. Also very cute.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages