Skip to content

epidarian/winventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Winventory – Multi-Cloud Inventory Aggregator

Winventory is a Go CLI that keeps a local record of AWS (and optionally Cloudflare) resources in SQLite, minimizes cloud API calls, and helps you identify, categorize, and link resources. Search/list/show use the local SQLite DB; a separate live command queries the cloud on demand with table output and a pager.

Quick start

  1. Create a configuration file:
providers:
  - aws

aws:
  use_cli_config: true
  granted_mode: false

search:
  default_limit: 1000

On Linux, place it in /etc/winventory/winventory.yaml. On Windows, use %APPDATA%\winventory\winventory.yaml. You can also pass --config and --db to override defaults.

  1. Run a sync to build the database:
winventory sync

(Defaults: config from the path above, DB in your home directory; see Platform paths below.)

  1. Search or list resources:
winventory search web
winventory list --type aws.ec2.instance --region us-east-1
winventory show i-0123456789abcdef0
  1. Query the cloud live (no DB):
winventory live --region us-east-1 --type ec2

Platform paths (defaults)

  • Linux: Config and shared files in /etc/winventory/ (e.g. /etc/winventory/winventory.yaml). SQLite database in the invoker's home: $HOME/.winventory/winventory.db. Binary typically installed to /usr/bin.
  • Windows: Config in %APPDATA%\winventory (e.g. winventory.yaml there). Database in %USERPROFILE%\.winventory\winventory.db. Binary in %ProgramFiles% or user PATH.
  • macOS: Same as Linux for config dir (/etc/winventory/); DB in $HOME/.winventory/winventory.db.

Override with --config and --db as needed.

Install scripts

  • Linux / macOS: From the repo root, run ./scripts/install.sh. Installs the binary to /usr/local/bin by default; use --prefix /usr for system-wide (e.g. sudo ./scripts/install.sh --prefix /usr). Creates /etc/winventory/ and installs a default winventory.yaml from config/winventory.yaml.example if none exists. For staged installs (packaging), use DESTDIR=/tmp/stage ./scripts/install.sh --prefix /usr.
  • Windows: Run .\scripts\install.ps1 from the repo root (PowerShell). Builds and installs the binary to %LOCALAPPDATA%\Programs\winventory, creates %APPDATA%\winventory, installs default config from config\winventory.yaml.example if missing, and adds the install directory to the user PATH. Optionally pass -BinTarget "C:\Program Files\winventory" to install elsewhere.

Implementation notes

  • CLI implemented in cmd/winventory/main.go using Cobra.
  • Platform defaults: internal/paths.
  • Config loader: internal/config.
  • SQLite store + migrations: internal/store.
  • Provider registry: internal/provider.
  • AWS provider (EC2 + S3 initial implementation): internal/provider/aws.
  • Sync and live orchestration: internal/syncer.

About

Map out, cache, and search for cloud resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors