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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target/
/dist/
/.DS_Store
*.log
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ cargo clippy --all-targets -- -D warnings
cargo run -- inspect 'https://example.com/?utm_source=newsletter&id=42'
```

For macOS menu bar app changes:

```sh
scripts/test-macos-app.sh
```

## Rule Contributions

Add default rules in [rules/base.plainlink](rules/base.plainlink). Keep them conservative.
Expand Down Expand Up @@ -52,6 +58,8 @@ PlainLink preserves unknown parameters by default because invite links, signed d

- Keep the engine platform-independent.
- Put OS-specific clipboard behavior behind small adapters.
- Keep the macOS menu bar app thin; it should call the CLI instead of duplicating core logic.
- Prefer explicit tests over clever matching.
- Add or update fixtures for rule behavior changes.
- Add or update app bundle smoke tests when changing menu app packaging.
- Do not add network behavior without a privacy-focused design note.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

Clean copied links before you share them.

PlainLink is a local-first URL cleaner. The MVP is a Rust command line tool with a portable cleaning engine and a macOS clipboard watcher. The project goal is to become a community-maintained, ad-blocker-list-style ruleset for removing tracking parameters from copied URLs.
PlainLink is a local-first URL cleaner. The MVP is a Rust command line tool with a portable cleaning engine, a macOS clipboard watcher, and a native macOS menu bar app. The project goal is to become a community-maintained, ad-blocker-list-style ruleset for removing tracking parameters from copied URLs at the system clipboard level.

```mermaid
flowchart LR
Copy["User copies a URL"] --> Clipboard["macOS clipboard"]
Clipboard --> Watcher["plainlink watch"]
Menu["PlainLink menu bar app"] --> Watcher["plainlink watch"]
Clipboard --> Watcher
Watcher --> Engine["plainlink-core"]
Engine --> Rules["rules/base.plainlink"]
Rules --> Engine
Expand All @@ -23,6 +24,8 @@ PlainLink is early MVP software.
- Explains removed parameters with `plainlink inspect`.
- Restores the last cleaned original URL with `plainlink restore`.
- Watches the macOS clipboard with `plainlink watch`.
- Cleans the current clipboard once with `plainlink clean-clipboard`.
- Provides a native macOS menu bar app built with Apple Command Line Tools.
- Installs PlainLink to a stable user path with `plainlink install`.
- Installs PlainLink as a user LaunchAgent with `plainlink agent install`.
- Validates community rule behavior with fixture-backed tests.
Expand All @@ -34,6 +37,7 @@ PlainLink is early MVP software.
cargo test
cargo run -- clean 'https://youtu.be/LYa_ReqRlcs?si=VC4qVB_EUC90uwbo'
cargo run -- inspect 'https://example.com/read?utm_source=newsletter&id=42'
cargo run -- clean-clipboard
cargo run -- restore
cargo run -- doctor
cargo run -- agent status
Expand All @@ -57,9 +61,19 @@ To install PlainLink to a stable user path and start the watcher:
cargo run -- install --interval-ms 500
```

To build and smoke-test the native macOS menu bar app:

```sh
scripts/test-macos-app.sh
```

This creates `dist/PlainLink.app`.

## Project Layout

```text
app/
macos/PlainLinkMenu Swift/AppKit menu bar app
src/
agent.rs macOS LaunchAgent management
cleaner.rs URL cleaning engine
Expand All @@ -76,6 +90,10 @@ docs/
ARCHITECTURE.md System design and data flow
RULES.md Rule syntax and contribution guidance
MACOS.md LaunchAgent notes
MENUBAR.md Native menu bar app notes
scripts/
build-macos-app.sh Build dist/PlainLink.app
test-macos-app.sh Build and smoke-test the app bundle
```

## Contributing
Expand Down
Loading
Loading