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.
- Create a configuration file:
providers:
- aws
aws:
use_cli_config: true
granted_mode: false
search:
default_limit: 1000On 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.
- Run a sync to build the database:
winventory sync(Defaults: config from the path above, DB in your home directory; see Platform paths below.)
- Search or list resources:
winventory search web
winventory list --type aws.ec2.instance --region us-east-1
winventory show i-0123456789abcdef0- Query the cloud live (no DB):
winventory live --region us-east-1 --type ec2- 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.yamlthere). 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.
- Linux / macOS: From the repo root, run
./scripts/install.sh. Installs the binary to/usr/local/binby default; use--prefix /usrfor system-wide (e.g.sudo ./scripts/install.sh --prefix /usr). Creates/etc/winventory/and installs a defaultwinventory.yamlfromconfig/winventory.yaml.exampleif none exists. For staged installs (packaging), useDESTDIR=/tmp/stage ./scripts/install.sh --prefix /usr. - Windows: Run
.\scripts\install.ps1from the repo root (PowerShell). Builds and installs the binary to%LOCALAPPDATA%\Programs\winventory, creates%APPDATA%\winventory, installs default config fromconfig\winventory.yaml.exampleif missing, and adds the install directory to the user PATH. Optionally pass-BinTarget "C:\Program Files\winventory"to install elsewhere.
- CLI implemented in
cmd/winventory/main.gousing 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.