@eat-pray-ai/wingman 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/codeql.yml +103 -0
- package/.github/workflows/publish.yml +23 -0
- package/.github/workflows/release.yml +52 -0
- package/.github/workflows/test.yml +32 -0
- package/.idea/workspace.xml +125 -0
- package/AGENTS.md +34 -0
- package/README.md +145 -0
- package/bin/wingman.ts +2 -0
- package/dist/bin/wingman.mjs +3 -0
- package/dist/src/cli.mjs +2229 -0
- package/dist/src/cli.mjs.map +1 -0
- package/docs/AGENTS.md +172 -0
- package/docs/resume.yaml +68 -0
- package/docs/wingman.pdf +2544 -1
- package/docs/wingman.png +0 -0
- package/docs/wingman.svg +376 -0
- package/package.json +51 -0
- package/scripts/generate-demo.ts +265 -0
- package/src/AGENTS.md +50 -0
- package/src/agents/AGENTS.md +52 -0
- package/src/agents/claude-code.ts +160 -0
- package/src/agents/codex.ts +174 -0
- package/src/agents/gemini-cli.ts +100 -0
- package/src/agents/opencode.ts +117 -0
- package/src/agents/registry.ts +12 -0
- package/src/agents/skills.ts +51 -0
- package/src/aggregator.ts +142 -0
- package/src/cli.ts +194 -0
- package/src/inventory.ts +84 -0
- package/src/pricing/AGENTS.md +36 -0
- package/src/pricing/__tests__/model-info.test.ts +135 -0
- package/src/pricing/engine.ts +86 -0
- package/src/pricing/models-dev.ts +253 -0
- package/src/resume/AGENTS.md +34 -0
- package/src/resume/__tests__/renderer.test.ts +286 -0
- package/src/resume/renderer.ts +286 -0
- package/src/svg/AGENTS.md +22 -0
- package/src/svg/components.ts +266 -0
- package/src/svg/icons.ts +83 -0
- package/src/themes/AGENTS.md +60 -0
- package/src/themes/__tests__/themes.test.ts +187 -0
- package/src/themes/github-dark/index.ts +46 -0
- package/src/themes/github-dark/palette.ts +19 -0
- package/src/themes/github-light/index.ts +46 -0
- package/src/themes/github-light/palette.ts +19 -0
- package/src/themes/onedark/index.ts +46 -0
- package/src/themes/onedark/palette.ts +19 -0
- package/src/themes/registry.ts +18 -0
- package/src/themes/shared/charts.ts +112 -0
- package/src/themes/shared/context.ts +47 -0
- package/src/themes/shared/footer.ts +52 -0
- package/src/themes/shared/header.ts +29 -0
- package/src/themes/shared/heatmap.ts +229 -0
- package/src/themes/shared/helpers.ts +103 -0
- package/src/themes/shared/inventory.ts +105 -0
- package/src/themes/shared/legend.ts +91 -0
- package/src/themes/shared/sections.ts +20 -0
- package/src/themes/shared/stats.ts +60 -0
- package/src/types.ts +106 -0
- package/tsconfig.json +18 -0
- package/tsdown.config.ts +10 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL Advanced"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ "main" ]
|
|
17
|
+
tags-ignore:
|
|
18
|
+
- '*'
|
|
19
|
+
pull_request:
|
|
20
|
+
branches: [ "main" ]
|
|
21
|
+
schedule:
|
|
22
|
+
- cron: '25 7 * * 3'
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
analyze:
|
|
26
|
+
name: Analyze (${{ matrix.language }})
|
|
27
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
|
28
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
|
29
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
|
30
|
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
|
31
|
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
|
32
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
33
|
+
permissions:
|
|
34
|
+
# required for all workflows
|
|
35
|
+
security-events: write
|
|
36
|
+
|
|
37
|
+
# required to fetch internal or private CodeQL packs
|
|
38
|
+
packages: read
|
|
39
|
+
|
|
40
|
+
# only required for workflows in private repositories
|
|
41
|
+
actions: read
|
|
42
|
+
contents: read
|
|
43
|
+
|
|
44
|
+
strategy:
|
|
45
|
+
fail-fast: false
|
|
46
|
+
matrix:
|
|
47
|
+
include:
|
|
48
|
+
- language: actions
|
|
49
|
+
build-mode: none
|
|
50
|
+
- language: javascript-typescript
|
|
51
|
+
build-mode: none
|
|
52
|
+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
|
53
|
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
|
54
|
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
|
55
|
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
|
56
|
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
|
57
|
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
|
58
|
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
|
59
|
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
|
60
|
+
steps:
|
|
61
|
+
- name: Checkout repository
|
|
62
|
+
uses: actions/checkout@v6
|
|
63
|
+
|
|
64
|
+
# Add any setup steps before running the `github/codeql-action/init` action.
|
|
65
|
+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
|
66
|
+
# or others). This is typically only required for manual builds.
|
|
67
|
+
# - name: Setup runtime (example)
|
|
68
|
+
# uses: actions/setup-example@v1
|
|
69
|
+
|
|
70
|
+
# Initializes the CodeQL tools for scanning.
|
|
71
|
+
- name: Initialize CodeQL
|
|
72
|
+
uses: github/codeql-action/init@v4
|
|
73
|
+
with:
|
|
74
|
+
languages: ${{ matrix.language }}
|
|
75
|
+
build-mode: ${{ matrix.build-mode }}
|
|
76
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
77
|
+
# By default, queries listed here will override any specified in a config file.
|
|
78
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
79
|
+
|
|
80
|
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
81
|
+
# queries: security-extended,security-and-quality
|
|
82
|
+
|
|
83
|
+
# If the analyze step fails for one of the languages you are analyzing with
|
|
84
|
+
# "We were unable to automatically build your code", modify the matrix above
|
|
85
|
+
# to set the build mode to "manual" for that language. Then modify this step
|
|
86
|
+
# to build your code.
|
|
87
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
88
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
89
|
+
- name: Run manual build steps
|
|
90
|
+
if: matrix.build-mode == 'manual'
|
|
91
|
+
shell: bash
|
|
92
|
+
run: |
|
|
93
|
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
|
94
|
+
'languages you are analyzing, replace this with the commands to build' \
|
|
95
|
+
'your code, for example:'
|
|
96
|
+
echo ' make bootstrap'
|
|
97
|
+
echo ' make release'
|
|
98
|
+
exit 1
|
|
99
|
+
|
|
100
|
+
- name: Perform CodeQL Analysis
|
|
101
|
+
uses: github/codeql-action/analyze@v4
|
|
102
|
+
with:
|
|
103
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
|
+
- uses: actions/setup-node@v6
|
|
17
|
+
with:
|
|
18
|
+
node-version: "22"
|
|
19
|
+
cache: npm
|
|
20
|
+
- run: npm ci
|
|
21
|
+
- run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version
|
|
22
|
+
- run: npm run build
|
|
23
|
+
- run: npm publish --provenance --access public
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Publish]
|
|
6
|
+
types: [completed]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
if: >-
|
|
14
|
+
github.event.workflow_run.conclusion == 'success' &&
|
|
15
|
+
startsWith(github.event.workflow_run.head_branch, 'v')
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
ref: refs/tags/${{ github.event.workflow_run.head_branch }}
|
|
22
|
+
|
|
23
|
+
- name: Generate release notes
|
|
24
|
+
id: notes
|
|
25
|
+
env:
|
|
26
|
+
TAG: ${{ github.event.workflow_run.head_branch }}
|
|
27
|
+
run: |
|
|
28
|
+
PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${TAG}$" | head -n1)
|
|
29
|
+
if [ -n "$PREV_TAG" ]; then
|
|
30
|
+
NOTES=$(git log --pretty=format:"- %s" "${PREV_TAG}..${TAG}")
|
|
31
|
+
else
|
|
32
|
+
NOTES=$(git log --pretty=format:"- %s" "${TAG}")
|
|
33
|
+
fi
|
|
34
|
+
{
|
|
35
|
+
echo "body<<EOF"
|
|
36
|
+
echo "$NOTES"
|
|
37
|
+
echo "EOF"
|
|
38
|
+
} >> "$GITHUB_OUTPUT"
|
|
39
|
+
|
|
40
|
+
- name: Create GitHub release
|
|
41
|
+
env:
|
|
42
|
+
GH_TOKEN: ${{ github.token }}
|
|
43
|
+
TAG: ${{ github.event.workflow_run.head_branch }}
|
|
44
|
+
run: |
|
|
45
|
+
PRERELEASE=""
|
|
46
|
+
if [[ "$TAG" == *-* ]]; then
|
|
47
|
+
PRERELEASE="--prerelease"
|
|
48
|
+
fi
|
|
49
|
+
gh release create "$TAG" \
|
|
50
|
+
--title "$TAG" \
|
|
51
|
+
--notes "${{ steps.notes.outputs.body }}" \
|
|
52
|
+
$PRERELEASE
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- "**.md"
|
|
8
|
+
- "docs/**"
|
|
9
|
+
- "LICENSE"
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main]
|
|
12
|
+
paths-ignore:
|
|
13
|
+
- "**.md"
|
|
14
|
+
- "docs/**"
|
|
15
|
+
- "LICENSE"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
node-version: ["22", "lts/*"]
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
- uses: actions/setup-node@v6
|
|
26
|
+
with:
|
|
27
|
+
node-version: ${{ matrix.node-version }}
|
|
28
|
+
cache: npm
|
|
29
|
+
- run: npm ci
|
|
30
|
+
- run: npx tsc --noEmit
|
|
31
|
+
- run: npm test
|
|
32
|
+
- run: npm run build
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="AutoImportSettings">
|
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ChangeListManager">
|
|
7
|
+
<list default="true" id="ccba457e-63dd-4ba5-bf17-c48ab102bbae" name="Changes" comment="" />
|
|
8
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="CopilotPersistence">
|
|
14
|
+
<persistenceIdMap>
|
|
15
|
+
<entry key="_/Users/chaoqun.yang/workspace/func/infinite-ammo" value="3BUIR6J4Z7rHzDlYXeBtEi1kMh7" />
|
|
16
|
+
</persistenceIdMap>
|
|
17
|
+
</component>
|
|
18
|
+
<component name="Git.Settings">
|
|
19
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
20
|
+
</component>
|
|
21
|
+
<component name="GitToolBoxStore">
|
|
22
|
+
<option name="recentBranches">
|
|
23
|
+
<RecentBranches>
|
|
24
|
+
<option name="branchesForRepo">
|
|
25
|
+
<list>
|
|
26
|
+
<RecentBranchesForRepo>
|
|
27
|
+
<option name="branches">
|
|
28
|
+
<list>
|
|
29
|
+
<RecentBranch>
|
|
30
|
+
<option name="branchName" value="main" />
|
|
31
|
+
<option name="lastUsedInstant" value="1774857578" />
|
|
32
|
+
</RecentBranch>
|
|
33
|
+
</list>
|
|
34
|
+
</option>
|
|
35
|
+
<option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
|
|
36
|
+
</RecentBranchesForRepo>
|
|
37
|
+
</list>
|
|
38
|
+
</option>
|
|
39
|
+
</RecentBranches>
|
|
40
|
+
</option>
|
|
41
|
+
</component>
|
|
42
|
+
<component name="MacroExpansionManager">
|
|
43
|
+
<option name="directoryName" value="w40Ke6tZ" />
|
|
44
|
+
</component>
|
|
45
|
+
<component name="ProjectColorInfo">{
|
|
46
|
+
"associatedIndex": 5,
|
|
47
|
+
"fromUser": false
|
|
48
|
+
}</component>
|
|
49
|
+
<component name="ProjectId" id="3BUIR6J4Z7rHzDlYXeBtEi1kMh7" />
|
|
50
|
+
<component name="ProjectLevelVcsManager">
|
|
51
|
+
<ConfirmationsSetting value="1" id="Add" />
|
|
52
|
+
</component>
|
|
53
|
+
<component name="ProjectViewState">
|
|
54
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
55
|
+
<option name="showExcludedFiles" value="false" />
|
|
56
|
+
<option name="showLibraryContents" value="true" />
|
|
57
|
+
</component>
|
|
58
|
+
<component name="PropertiesComponent">{
|
|
59
|
+
"keyToString": {
|
|
60
|
+
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
|
61
|
+
"RunOnceActivity.GoLinterPluginOnboardingV2": "true",
|
|
62
|
+
"RunOnceActivity.GoLinterPluginStorageMigration": "true",
|
|
63
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
64
|
+
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
|
65
|
+
"RunOnceActivity.git.unshallow": "true",
|
|
66
|
+
"RunOnceActivity.go.formatter.settings.were.checked": "true",
|
|
67
|
+
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
|
68
|
+
"codeWithMe.voiceChat.enabledByDefault": "false",
|
|
69
|
+
"git-widget-placeholder": "main",
|
|
70
|
+
"kotlin-language-version-configured": "true",
|
|
71
|
+
"node.js.detected.package.eslint": "true",
|
|
72
|
+
"node.js.detected.package.tslint": "true",
|
|
73
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
74
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
75
|
+
"nodejs_package_manager_path": "npm",
|
|
76
|
+
"org.rust.first.attach.projects": "true",
|
|
77
|
+
"settings.editor.selected.configurable": "preferences.pluginManager",
|
|
78
|
+
"ts.external.directory.path": "/Users/chaoqun.yang/workspace/func/infinite-ammo/node_modules/typescript/lib",
|
|
79
|
+
"vue.rearranger.settings.migration": "true"
|
|
80
|
+
}
|
|
81
|
+
}</component>
|
|
82
|
+
<component name="RecentsManager">
|
|
83
|
+
<key name="MoveFile.RECENT_KEYS">
|
|
84
|
+
<recent name="$PROJECT_DIR$/docs" />
|
|
85
|
+
</key>
|
|
86
|
+
</component>
|
|
87
|
+
<component name="RustProjectSettings">
|
|
88
|
+
<option name="toolchainHomeDirectory" value="$USER_HOME$/.cargo/bin" />
|
|
89
|
+
</component>
|
|
90
|
+
<component name="TaskManager">
|
|
91
|
+
<task active="true" id="Default" summary="Default task">
|
|
92
|
+
<changelist id="ccba457e-63dd-4ba5-bf17-c48ab102bbae" name="Changes" comment="" />
|
|
93
|
+
<created>1774537211363</created>
|
|
94
|
+
<option name="number" value="Default" />
|
|
95
|
+
<option name="presentableId" value="Default" />
|
|
96
|
+
<updated>1774537211363</updated>
|
|
97
|
+
<workItem from="1774537212820" duration="1686000" />
|
|
98
|
+
<workItem from="1774615908872" duration="9536000" />
|
|
99
|
+
<workItem from="1774657336443" duration="63430000" />
|
|
100
|
+
</task>
|
|
101
|
+
<servers />
|
|
102
|
+
</component>
|
|
103
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
104
|
+
<option name="version" value="3" />
|
|
105
|
+
</component>
|
|
106
|
+
<component name="Vcs.Log.Tabs.Properties">
|
|
107
|
+
<option name="TAB_STATES">
|
|
108
|
+
<map>
|
|
109
|
+
<entry key="MAIN">
|
|
110
|
+
<value>
|
|
111
|
+
<State />
|
|
112
|
+
</value>
|
|
113
|
+
</entry>
|
|
114
|
+
</map>
|
|
115
|
+
</option>
|
|
116
|
+
</component>
|
|
117
|
+
<component name="github-copilot-workspace">
|
|
118
|
+
<instructionFileLocations>
|
|
119
|
+
<option value=".github/instructions" />
|
|
120
|
+
</instructionFileLocations>
|
|
121
|
+
<promptFileLocations>
|
|
122
|
+
<option value=".github/prompts" />
|
|
123
|
+
</promptFileLocations>
|
|
124
|
+
</component>
|
|
125
|
+
</project>
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# AGENTS.md — Wingman (`@eat-pray-ai/wingman`)
|
|
2
|
+
|
|
3
|
+
TypeScript CLI that reads local AI coding-agent usage data and produces shareable SVG stat cards and rendercv-compatible YAML resumes.
|
|
4
|
+
Pipeline: Agent Adapters → `UsageRecord[]` → Aggregator → `ShowcaseData` → Renderer → SVG / YAML.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Quick Reference
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm run dev # run CLI via tsx (no build needed)
|
|
12
|
+
npm run build # bundle with tsdown → dist/
|
|
13
|
+
npx tsc --noEmit # type-check only (no emit)
|
|
14
|
+
npm test # vitest run (all tests)
|
|
15
|
+
npx vitest run src/foo.test.ts # single test file
|
|
16
|
+
npx vitest run -t "test name pattern" # single test by name
|
|
17
|
+
npm run test:watch # vitest in watch mode
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- **Node 22** · **TypeScript strict** · **ESM** · **tsdown bundler** · No linter/formatter configured
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Documentation Index
|
|
25
|
+
|
|
26
|
+
| Guide | Scope |
|
|
27
|
+
|---|---|
|
|
28
|
+
| **[docs/AGENTS.md](docs/AGENTS.md)** | Code style, architecture, common patterns, dependencies |
|
|
29
|
+
| [src/AGENTS.md](src/AGENTS.md) | Source overview, module map, key types, extension points |
|
|
30
|
+
| [src/agents/AGENTS.md](src/agents/AGENTS.md) | Agent adapter contract, adding new agents |
|
|
31
|
+
| [src/themes/AGENTS.md](src/themes/AGENTS.md) | Theme renderer structure, section pattern |
|
|
32
|
+
| [src/svg/AGENTS.md](src/svg/AGENTS.md) | SVG component primitives, opts pattern |
|
|
33
|
+
| [src/pricing/AGENTS.md](src/pricing/AGENTS.md) | Pricing engine, model metadata, models.dev API |
|
|
34
|
+
| [src/resume/AGENTS.md](src/resume/AGENTS.md) | Resume YAML renderer for rendercv |
|
package/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Wingman
|
|
2
|
+
|
|
3
|
+
Showcase your AI pair usage — SVG cards, resumes, and more.
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<tr>
|
|
7
|
+
<th align="center">SVG Card</th>
|
|
8
|
+
<th align="center">Resume (<a href="docs/wingman.pdf">PDF</a>)</th>
|
|
9
|
+
</tr>
|
|
10
|
+
<tr>
|
|
11
|
+
<td align="center"><img src="docs/wingman.svg" width="400" alt="SVG Card"/></td>
|
|
12
|
+
<td align="center"><img src="docs/wingman.png" width="400" alt="Resume"/></td>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
15
|
+
|
|
16
|
+
## Supported Agents
|
|
17
|
+
|
|
18
|
+
| Agent | Data Source | Format |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **Claude Code** | `~/.claude/projects/*/*.jsonl` | JSONL |
|
|
21
|
+
| **opencode** | `~/.local/share/opencode/opencode.db` | SQLite |
|
|
22
|
+
| **Gemini CLI** | `~/.gemini/tmp/*/chats/session-*.json` | JSON |
|
|
23
|
+
| **Codex** | `~/.codex/state_5.sqlite` | SQLite |
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Generate an SVG stats card (last 90 days)
|
|
29
|
+
npx @eat-pray-ai/wingman card
|
|
30
|
+
|
|
31
|
+
# Generate a rendercv-compatible YAML resume (last 180 days)
|
|
32
|
+
npx @eat-pray-ai/wingman resume
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
### `card` — SVG Stats Card
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# All agents, last 90 days (default)
|
|
41
|
+
wingman card
|
|
42
|
+
|
|
43
|
+
# Specific agents, custom output
|
|
44
|
+
wingman card --agents claude-code,opencode -o my-stats.svg
|
|
45
|
+
|
|
46
|
+
# Date range
|
|
47
|
+
wingman card --since 2026-01-01 --until 2026-03-30
|
|
48
|
+
|
|
49
|
+
# Last 7 days with specific theme
|
|
50
|
+
wingman card --days 7 --theme github-dark
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| Flag | Short | Default | Description |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| `--output` | `-o` | `wingman.svg` | Output file path |
|
|
56
|
+
| `--theme` | `-t` | `github-dark` | Theme name |
|
|
57
|
+
| `--agents` | | all detected | Comma-separated agent filter |
|
|
58
|
+
| `--since` | | 90 days ago | Start date (YYYY-MM-DD) |
|
|
59
|
+
| `--until` | | today | End date (YYYY-MM-DD) |
|
|
60
|
+
| `--days` | | `90` | Last N days shorthand |
|
|
61
|
+
| `--sections` | | all | Comma-separated sections to include |
|
|
62
|
+
|
|
63
|
+
The default `github-dark` theme renders:
|
|
64
|
+
|
|
65
|
+
1. **Header** — title + date range
|
|
66
|
+
2. **Top Stats** — tokens (input/output/cache breakdown), estimated cost, sessions
|
|
67
|
+
3. **Agent Legend** — color-coded bars showing share per agent
|
|
68
|
+
4. **Charts** — donut chart (token types) + sparkline (daily activity) + model breakdown bars
|
|
69
|
+
5. **Activity Heatmap** — GitHub-style contribution grid for daily usage
|
|
70
|
+
6. **Inventory** — plugins, MCP servers, and skills detected across agents
|
|
71
|
+
7. **Footer** — branding
|
|
72
|
+
|
|
73
|
+
### `resume` — rendercv YAML Resume
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# All agents, last 180 days (default)
|
|
77
|
+
wingman resume
|
|
78
|
+
|
|
79
|
+
# Custom name and headline
|
|
80
|
+
wingman resume --name "My Team" --headline "AI Development"
|
|
81
|
+
|
|
82
|
+
# Specific output path
|
|
83
|
+
wingman resume -o my-resume.yaml
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
| Flag | Short | Default | Description |
|
|
87
|
+
|---|---|---|---|
|
|
88
|
+
| `--output` | `-o` | `resume.yaml` | Output file path |
|
|
89
|
+
| `--name` | | `Wingman` | Resume name |
|
|
90
|
+
| `--headline` | | `AI pair for everything` | Resume headline |
|
|
91
|
+
| `--agents` | | all detected | Comma-separated agent filter |
|
|
92
|
+
| `--since` | | 180 days ago | Start date (YYYY-MM-DD) |
|
|
93
|
+
| `--until` | | today | End date (YYYY-MM-DD) |
|
|
94
|
+
| `--days` | | `180` | Last N days shorthand |
|
|
95
|
+
|
|
96
|
+
The generated YAML follows the [rendercv](https://rendercv.com/) schema with sections:
|
|
97
|
+
|
|
98
|
+
- **Summary** — agent count, total tokens, sessions, cost
|
|
99
|
+
- **Experience** — one entry per agent (sorted by usage), with model breakdowns
|
|
100
|
+
- **Education** — models grouped by AI lab (Anthropic, Google, OpenAI, etc.)
|
|
101
|
+
- **Technologies** — plugins, MCP servers, skills inventory
|
|
102
|
+
|
|
103
|
+
Render your resume at [rendercv.com](https://rendercv.com/).
|
|
104
|
+
|
|
105
|
+
## How It Works
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Agent Adapters → UsageRecord[] → Aggregator → ShowcaseData → Renderer → SVG / YAML
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
1. **Agent adapters** read local data from each AI coding agent (JSONL, SQLite, JSON)
|
|
112
|
+
2. **Aggregator** groups by agent, calculates totals, builds per-model and daily breakdowns
|
|
113
|
+
3. **Pricing engine** fetches model costs from [models.dev](https://models.dev) (24h disk cache) to estimate spend
|
|
114
|
+
4. **Renderers** produce output:
|
|
115
|
+
- **Theme renderer** → self-contained SVG string (embeddable anywhere)
|
|
116
|
+
- **Resume renderer** → rendercv-compatible YAML
|
|
117
|
+
|
|
118
|
+
## Development
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npm install
|
|
122
|
+
npm run dev -- card --days 30 # run directly via tsx
|
|
123
|
+
npm run dev -- resume # generate resume YAML
|
|
124
|
+
npm run build # bundle to dist/
|
|
125
|
+
npx tsc --noEmit # type-check
|
|
126
|
+
npm test # vitest
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
See [AGENTS.md](AGENTS.md) for code style and architecture details.
|
|
130
|
+
|
|
131
|
+
## Extending
|
|
132
|
+
|
|
133
|
+
### Add a new agent adapter
|
|
134
|
+
|
|
135
|
+
1. Create `src/agents/my-agent.ts` implementing `AgentAdapter`
|
|
136
|
+
2. Register in `src/agents/registry.ts`
|
|
137
|
+
|
|
138
|
+
### Add a new theme
|
|
139
|
+
|
|
140
|
+
1. Create `src/themes/my-theme/index.ts` implementing `ThemeRenderer`
|
|
141
|
+
2. Register in `src/themes/registry.ts`
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
MIT
|
package/bin/wingman.ts
ADDED