Skip to content
Merged
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
10 changes: 8 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

version: 2
updates:
## Github Actions
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests
open-pull-requests-limit: 100
schedule:
interval: 'daily'

## Frontend

- package-ecosystem: 'npm' # See documentation for possible values
Expand Down Expand Up @@ -40,12 +47,11 @@ updates:
open-pull-requests-limit: 100
schedule:
interval: 'daily'

## CLI

- package-ecosystem: 'uv' # See documentation for possible values
directory: './src/cli' # Location of package manifests
open-pull-requests-limit: 100
schedule:
interval: 'daily'

34 changes: 34 additions & 0 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test CLI Build

on:
push:
branches: ['main']
paths:
- 'src/cli/**'
- '.github/workflows/**'
pull_request:
branches: ['main']
paths:
- 'src/cli/**'
- '.github/workflows/**'
workflow_dispatch:

jobs:
build-docker:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/cli

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Install deps with uv
run: uv sync --frozen

- name: Build
run: uv run poe nuitka
6 changes: 5 additions & 1 deletion src/cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,8 @@ __marimo__/
*.pyd

# Ignore the final exe
*.exe
*.exe

app.build
app.dist
app.onefile-build
2 changes: 1 addition & 1 deletion src/cli/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
cpython@3.13
26 changes: 14 additions & 12 deletions src/cli/app/main.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
from async_typer import AsyncTyper
import os
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
import py7zr

app = AsyncTyper()


key = ChaCha20Poly1305.generate_key()
chacha = ChaCha20Poly1305(key)


nonce = os.urandom(12)


@app.async_command()
async def hello(name: str):
ciphertext = chacha.encrypt(nonce, f"hello {name}".encode(), None)

print(ciphertext)
filters = [
{
"id": py7zr.FILTER_LZMA2,
"preset": 9,
"dict_size": 1024 * 1024 * 512,
}
]
with py7zr.SevenZipFile(
"Archive.7z",
"w",
filters=filters,
) as archive:
archive.writeall("test/")
7 changes: 3 additions & 4 deletions src/cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ name = "cli"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
requires-python = ">=3.11"
dependencies = [
# CLI
"typer>=0.21.0",
"async-typer>=0.1.10",
# Asnyc loop implementation
"uvloop>=0.22.1;sys_platform=='linux'",
# Cryptography helper
"cryptography>=46.0.3",
# Http Client
"httpx[http2]>=0.28.1",
"py7zr>=1.1.0",
]


[dependency-groups]
build = ["nuitka>=2.8.9"]
build = ["nuitka>=2.8.9", "zstandard>=0.25.0"]
dev = ["poethepoet>=0.39.0"]

[tool.poe.tasks]
Expand Down
630 changes: 564 additions & 66 deletions src/cli/uv.lock

Large diffs are not rendered by default.