Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,39 @@ jobs:
with:
name: framework-tool-rpm
path: target/generate-rpm/*.rpm

build-snap:
name: Build Snap
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Build snap
uses: snapcore/action-build@v1
id: build

- name: Upload snap artifact
uses: actions/upload-artifact@v6
with:
name: framework-tool-snap
path: ${{ steps.build.outputs.snap }}

- name: Publish to edge channel
if: github.ref == 'refs/heads/main'
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: edge

- name: Publish to candidate channel
if: github.event_name == 'release'
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: candidate
55 changes: 55 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: framework-tool
base: core24
adopt-info: framework-tool
summary: CLI tool to inspect and control Framework Computer systems
description: |
framework_tool is a CLI utility to interact with Framework Computer laptop
and desktop firmware and hardware. Features include:
.
- Firmware inspection and updates (BIOS, EC, PD controllers, retimers)
- System status monitoring (power, thermal, sensors, USB-C ports)
- Hardware configuration (keyboard backlight, battery charge limits, fan control)
- Expansion card management (HDMI/DP/audio cards)
- Framework 16 specific features (input deck, expansion bay)
- NVIDIA GPU support
.
Note: Most features require root privileges (sudo framework-tool ...).

grade: stable
confinement: classic
compression: lzo

parts:
framework-tool:
plugin: rust
source: .
build-packages:
- libhidapi-dev
- libusb-1.0-0-dev
- libudev-dev
- pkg-config
stage-packages:
- libhidapi-hidraw0
- libusb-1.0-0
- libudev1
override-pull: |
craftctl default
VERSION=$(craftctl get version)
if [ -z "$VERSION" ]; then
VERSION=$(git describe --tags --abbrev=10 2>/dev/null || echo "0.0.0+git$(git rev-parse --short=10 HEAD)")
craftctl set version="$VERSION"
fi
override-build: |
cd "${CRAFT_PART_SRC}"
cargo build --release -p framework_tool --features nvidia
install -Dm755 target/release/framework_tool "${CRAFT_PART_INSTALL}/bin/framework_tool"
install -Dm644 "${CRAFT_PART_SRC}/completions/bash/framework_tool" \
"${CRAFT_PART_INSTALL}/share/bash-completion/completions/framework_tool"
install -Dm644 "${CRAFT_PART_SRC}/completions/zsh/_framework_tool" \
"${CRAFT_PART_INSTALL}/share/zsh/site-functions/_framework_tool"
install -Dm644 "${CRAFT_PART_SRC}/completions/fish/framework_tool.fish" \
"${CRAFT_PART_INSTALL}/share/fish/vendor_completions.d/framework_tool.fish"

apps:
framework-tool:
command: bin/framework_tool
Loading