Skip to content

Add option to install context-lens#41

Open
webwarrior-ws wants to merge 1 commit into
tarsgate:masterfrom
webwarrior-ws:context-lens-squashed
Open

Add option to install context-lens#41
webwarrior-ws wants to merge 1 commit into
tarsgate:masterfrom
webwarrior-ws:context-lens-squashed

Conversation

@webwarrior-ws
Copy link
Copy Markdown
Contributor

@webwarrior-ws webwarrior-ws commented May 12, 2026

Added a --context-lens (-c) flag, that installs context-lens after installing Pi, and creates a launcher script "cpi" for it.

context-lens is installed from git repository, with 2 patches applied:

  • Enable using PPQ.ai in Pi through MITM proxy.
  • When launching pi, add providers based on env. vars & auth.json.

Launcher script launches context-lens with pi argument. It sets up pi (creates temp pi directory with modified settings),
in particular to route its traffic through mitmproxy. Otherwise context-lens wouldn't be able to capture requests. It can't use spi because pi argument is not an executable name but a switch that tells context-lens to perform mentioned pi setup.

Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
@webwarrior-ws webwarrior-ws force-pushed the context-lens-squashed branch 2 times, most recently from 7c1db0e to 0f58eeb Compare May 12, 2026 13:19
Comment thread src/index.ts Outdated
Comment thread src/index.ts
Comment thread ReadMe.md
@webwarrior-ws webwarrior-ws force-pushed the context-lens-squashed branch from 0f58eeb to c0fd5d7 Compare May 13, 2026 08:20
Comment thread src/index.ts Outdated
@webwarrior-ws webwarrior-ws force-pushed the context-lens-squashed branch 2 times, most recently from d24d478 to 14c0eaf Compare May 13, 2026 09:04
@knocte
Copy link
Copy Markdown
Contributor

knocte commented May 13, 2026

of what cpi launcher script does.

No, not clear enough. It has to mention why it can't use spi

@webwarrior-ws webwarrior-ws force-pushed the context-lens-squashed branch 2 times, most recently from bac7dd4 to f498b5c Compare May 13, 2026 09:12
@webwarrior-ws
Copy link
Copy Markdown
Contributor Author

of what cpi launcher script does.

No, not clear enough. It has to mention why it can't use spi

Is it good now?

@knocte
Copy link
Copy Markdown
Contributor

knocte commented May 13, 2026

mitmproxy is also installed to allow using PPQ.ai provider and other custom providers.

Outdated text?

pi tells context-lens to perform mentioned pi setup.

pi speaks to CL??

@webwarrior-ws webwarrior-ws force-pushed the context-lens-squashed branch from f498b5c to 0f6447d Compare May 13, 2026 12:08
@webwarrior-ws
Copy link
Copy Markdown
Contributor Author

mitmproxy is also installed to allow using PPQ.ai provider and other custom providers.

Outdated text?

Removed that paragraph.

pi tells context-lens to perform mentioned pi setup.

pi speaks to CL??

Rephrased. Should be clearer now.

Comment thread src/index.ts Outdated
Added a --context-lens (-c) flag, that installs context-lens
after installing Pi, and creates a launcher script "cpi" for it.

context-lens is installed from git repository, with 2 patches
applied:
- Enable using PPQ.ai in Pi through MITM proxy.
- When launching pi, add providers based on env. vars &
  auth.json.

Launcher script launches context-lens with `pi` argument. It
sets up pi (creates temp pi directory with modified settings),
in particular to route its traffic through mitmproxy. Otherwise
context-lens wouldn't be able to capture requests. It can't use
`spi` because `pi` argument is not an executable name but a
switch that tells context-lens to perform mentioned pi setup.
@webwarrior-ws webwarrior-ws force-pushed the context-lens-squashed branch from 0f6447d to 8028e02 Compare May 13, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants